package com.ropeok.entity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Objects;

public class RoleAndPermission {

    @NotNull(message = "请输入角色id")
    private Integer role_id;
    @NotNull(message = "请输入权限id")
    private Integer permission_id;

    @Override
    public String toString() {
        return "RoleAndPermission{" +
                "role_id=" + role_id +
                ", permisssion_id=" + permission_id +
                '}';
    }

    @Override
    public boolean equals(Object obj) {
        if(this==obj){
            return true;
        }
        if (obj==null||getClass()!=obj.getClass()){
            return false;
        }
        RoleAndPermission roleAndPermission=(RoleAndPermission) obj;
        return Objects.equals(role_id,roleAndPermission.role_id)&&Objects.equals(permission_id,roleAndPermission.permission_id);
    }

    public Integer getRole_id() {
        return role_id;
    }

    public void setRole_id(Integer role_id) {
        this.role_id = role_id;
    }

    public Integer getPermission_id() {
        return permission_id;
    }

    public void setPermission_id(Integer permisssion_id) {
        this.permission_id = permisssion_id;
    }
}
